import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
const httpOptions = {
  headers: new HttpHeaders({
    'Content-Type': 'application/json',
  })
};
@Injectable({
  providedIn: 'root'
})
export class GetdataService {
  idealData: any = [];
  suitableData: any = [];
  theBestData: any = [];
  user: any = {};
  private carUrl: any = 'http://47.103.30.229:8080/getMark/城市概念软件园';

  constructor(private http: HttpClient) { }
  // 初始化表单选项请求
  getMessage(): Observable<any> {
    return this.http.get(this.carUrl);
  }

  // 查询请求
  postCar(data: any): Observable<any> {
    const api: any = 'http://47.103.30.229:8080/getResult';
    return this.http.post(api, data, httpOptions);
  }

  getdata() {
    return 1;
  }
}
